#include <stdlib.h>
#include <stdio.h>

int main() {
  int *p1;
  float *p2;
  char *p3;
  int i = 2;
  FILE *arq1 = NULL;
  p1 = malloc(sizeof(int));
  p2 = malloc(sizeof(float));
  p3 = malloc(sizeof(char));
  arq1 = fopen("./arq701.txt","r+");
  fread(p1, sizeof(int), 1, arq1);
  fread(p2, sizeof(float), 1, arq1);
  fread(p3, sizeof(char), 1, arq1);
  printf("%d\n",*p1);
  printf("%f\n",*p2);
  printf("%c\n",*p3);
  fwrite(&i, sizeof(i), 1, arq1);
  if (arq1 != NULL)
    fclose(arq1);
}
